/*
 * @message: 描述
 * @Author: Roy
 * @Email: cx_love_xc@163.com
 * @Github: cx_love_xc@163.com
 * @Date: 2022-01-18 10:56:51
 * @LastEditors: Roy
 * @LastEditTime: 2022-01-18 11:56:06
 * @Deprecated: 否
 * @FilePath: /blog/src/admin/container/login/index.jsx
 */

import React from 'react';
import { AuthingGuard } from "@authing/react-ui-components";
// 引入 css 文件
import "@authing/react-ui-components/lib/index.min.css";


const Login = () => {
    const appId = "61e628aed302377c707e90a0";
    const onLogin = (userInfo) => {
        const { token, tokenExpiredAt, photo, } = userInfo;
        localStorage.authingToken = token;
        localStorage.tokenExpiredAt = tokenExpiredAt;
        localStorage.photo = photo;
        window.location.reload();
    };
    return <AuthingGuard appId={appId} onLogin={onLogin} />;
}

export default Login;